{% extends "base.html" %}
{% block content %}
<div style="margin-left:20px">
{% if node != None %}
<table border="0">
<tr class="thread-tr">
<td>
<span class="thread-title"><a href="/node?nodeid={{ node['id'] }}" style="color:#000000; text-decoration:none">{{ escape(node['title']) }}</a></span> by {{ escape(node['username']) }} at {{ escape(node['time']) }} | <a href="/newpost?nodeid={{ node['id'] }}&type=comment"><img src="http://www.indiana.edu/~taiwan/cgi-bin/yabbfiles/Buttons/English/reply.png" /></a>
<table>
<tr>
<td class="blank"></td>
<td><div class="contect-desc"> {{ node['content'] }} </div> </td>
</tr>
</table>
</td>
</tr>

</table>
{% end %}
<script charset="utf-8" src="/static/kindeditor.js"></script>
<script>
    KE.show({
		imageUploadJson : '/upload',
        id : 'editor_id',
        width : '700px',
        height : '400px'
    });
</script>
<form id="form1" name="form1" method="post" action="/newpost">
	{{ xsrf_form_html() }}
    <input type="hidden" name="backid" value="{{ backid }}"/> 
    <input type="hidden" name="type" value="{{ posttype }}"/> 
    <input type="hidden" name="nodeid" value="{{ nodeid }}"/> 
  	<div id="inputname">Hi:
    {{ name }} <a href="/auth/logout">logout</a></div>
    <input type="hidden" name="nodeid" value="{{ nodeid }}"/>
    <div id="inputtitle">title<br><input type="text" name="title" id="title" style="width:240px" value="{% if title != None %}{{ title }}{% end %}"/></div>
    <div id="inputcontent">content<br><textarea name="content" id="editor_id" cols="45" rows="5"></textarea></div>
    <label>
    <input type="submit" name="submit" id="submit" value="Submit" />
    </label>
</form>
</div>
{% end %}